package com.schrodinger.car;

public class ObserverCar implements IObserverCar {

	private ISubjectCar subjectCar;

	public ISubjectCar getSubjectCar() {
		return subjectCar;
	}

	public void setSubjectCar(ISubjectCar subjectCar) {
		this.subjectCar = subjectCar;
	}

	public ObserverCar(ISubjectCar subjectCar) {
		super();
		this.subjectCar = subjectCar;
	}

	@Override
	public void showInfo() {
		System.out.println(subjectCar.getState());
	}

}
